<?php
use wepay\join\demo\common\ConfigUtil;
$user_info = session_get(UserEnum::USER_INFO_SESSION_KEY);
?>
		<!doctype html>
<html lang="zh-CH">
<head>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	{{--<meta name="viewport" content="width=device-width, initial-scale=1">--}}
	<title>央票通</title>
	<link rel="stylesheet" href="./resource/css/index.css">
	<link rel="stylesheet" href="./resource/css/user.css">
</head>
<body>
<!-- 头部 -->
@include('common.index_head')
		<!-- 个人中心 -->
<div class="cont-user">
	<!-- 个人中心头部 -->
	@include('common.user_head')
	<div class="user-center">
		<div class="main">
			<!-- 个人中心列表 -->
			@include('common.user_left')
			<div class="user-container left">
				<div class="user-title user-password user-mon">
					<div class="title">
						<div class="h left">充值提现</div>
					</div>
					<div class="mon-ul">
						<ul>
							<li class="active"><a href="/user_money">充值</a></li>
							<li><a href="/user_money_">提现</a></li>
						</ul>
					</div>
					<div class="mon-box">
						<div class="user-box">
							<ul class="pass-ul">
								<li class="active"><a href="javascript:;">快捷支付</a></li>
								<li><a href="javascript:;">网银支付</a></li>
							</ul>
							<div class="pass-main">
								<?php  if(!empty($infoyeno)&&!empty($infocf->id_card)){?>
								<div class="pass-cont mon-charge">
									@if(!empty($info))
										<div class="user-bor user-cade">
											<div class="bank-title">
												<img src="./resource/img/user_bank.png" alt="">
											</div>
											<div class="user-mess">
												<div class="left cade">{{substr_replace($info->bank_num,'********',4,11)}}</div>
												<div class="span left clear">{{$info->bound_name}}</div>
												<div class="left"><span>{{date('Y-m-d',$info->created)}}</span></div>
											</div>
											<!--<a href="javascript:;" id="addBank">添加新卡支付</a> placeholder="请填写金额"-->
										</div>

									@endif
									<form method="post" action="paysign" id="payForm" onsubmit="return check_all()" target="_blank" class="form">
										<div class="form-group hide">
											<label for="" class="left control-label"><span>*</span>持卡人：</label>
											<input type="text" class="left form-control" placeholder="请填写持卡人姓名">
										</div>
										<div class="form-group hide">
											<label for="" class="left control-label"><span>*</span>银行卡号：</label>
											<input type="text" class="left form-control" placeholder="请填写银行卡号">
										</div>
										<div class="form-group hide form-margin">
											<img src="./resource/img/user_bank.png" alt="">
										</div>

										<div class="form-group form-rem">
											<label for="" class="left control-label"><span>*</span>充值金额：</label>
											<input type="text"  id="tradeAmount" name="tradeAmount"  value="" class="left form-control" >
											<div class="left remainder">
												可用余额：<span>￥<?php  if(!empty($UserExtendone->user_balance)){ echo $UserExtendone->user_balance;}else{ echo "0.00"; }?></span>
											</div>
											<input type="hidden" name="specBankCardNo" value="<?php  if (!empty($info)) {echo $info->bank_num; }?>"/>
											<input type="hidden" name="tradeNum" value="<?php echo ConfigUtil::get_trade_num()?>"/>
											<input type="hidden" name="tradeName" value="充值"/>
											<input type="hidden" name="tradeTime" value="<?php  echo time();?>"/>
											<input type="hidden" name="ip" value="<?php  echo $_SERVER["REMOTE_ADDR"];?>"/>
											<input type="hidden" name="successCallbackUrl" value="<?php  echo $_SERVER['HTTP_HOST'].'/checkSign';?>"/>
											<input type="submit" name="Submit" class="btn left btn-default" style="clear: both;margin:20px 0 0 105px;"  value=" 确认充值 ">
										</div>
										<div class="form-group form-margin" style="margin-left: 105px;">
											<p>温馨提示：每笔限额50000元，每日限额100000元，大数额充值请用网银充值。</p>
										</div>
									</form>
								</div>
								<?php  }elseif(!empty($infocf->id_card)) {  ?>
										<!--快捷卡开始-->
								<div class="pass-cont mon-charge">

									<div class="form-group">
										<label for="" class="left control-label">持卡人：</label>
										<div class="left form-span"><?php  if (!empty($infoname)) {echo $infoname->real_name; }?></div>
									</div>
									<div class="form-group">
										<label for="" class="left control-label">身份证号：</label>
										<div class="left form-span"><?php  if (!empty($infoname)) {echo substr_replace($infoname->id_card,'********',4,11);}?></div>
									</div>
									<div class="form-group">
										<label for="" class="left control-label">选择银行</label>
										<span class="bank-name" id="bank_name"></span>
										<a href="javascript:void(0)" class="chose-bank" id="chosebank">请选择</a>
									</div>
									<div class="form-group">
										<label for="" class="left control-label">银行卡号：</label>
										<input type="text" id="yinhang" class="left form-control" placeholder="请填写银行卡号">
									</div>
									<div class="form-group">
										<label for="" class="left control-label">手机号码：</label>
										<input type="text"   class="left form-control" placeholder="请填写手机号" value="{{substr_replace($infoname->mobile,'****',3,4);}}"><span id="t_mobile"></span>
										<input type="hidden" value="{{$infoname->mobile}}" id="phone">
										<input type="hidden" value="{{$infoname->real_name}}" id="real_name">
										<input type="hidden" value="{{$infoname->id_card}}" id="id_card">
									</div>

									{{--<div class="form-group form-code">--}}
									{{--<label for="" class="left control-label">短信验证码：</label>--}}
									{{--<input type="text" class="left form-control code" placeholder="请填写验证码" id="news_captcha" onblur="news()">--}}

									{{--<button type='button' class="left code" style="width: 118px;line-height: 30px;" id="f_captcha" >获取短信验证码</button><span id="t_news"></span>--}}

									{{--</div>--}}
									<input type="submit" class="btn left btn-default" onclick="getSltValue()" value="设置快捷卡">
									<div class="banks-choice">
										<div class="banks-title">请选择银行<div class="close"></div></div>
										<div class="banks">
											<ul>
												<li class="li_1"><label for="a"><input name="bank" type="radio" value="中国工商银行" id="a" shorthand="ICBC"/></label></li>
												<li class="li_2"><label for="b"><input name="bank" type="radio" value="中国建设银行" id="b" shorthand="CCB"/></label></li>
												<li class="li_3"><label for="c"><input name="bank" type="radio" value="招商银行" id="c" shorthand="CMB"/></label></li>
												<li class="li_4"><label for="d"><input name="bank" type="radio" value="中国邮政储蓄银行" id="d" shorthand="PSBC"/></label></li>
												<li class="li_5"><label for="e"><input name="bank" type="radio" value="交通银行" id="e" shorthand="BCM"/></label></li>
												<li class="li_6"><label for="f"><input name="bank" type="radio" value="中国银行" id="f" shorthand="BOC"/></label></li>
												<li class="li_7"><label for="g"><input name="bank" type="radio" value="北京银行" id="g" shorthand="BOB"/></label></li>
												<li class="li_8"><label for="h"><input name="bank" type="radio" value="中信银行" id="h" shorthand="CITIC"/></label></li>
												<li class="li_9"><label for="i"><input name="bank" type="radio" value="华夏银行" id="i" shorthand="HXB"/></label></li>
												{{--<li class="li_10"><label for="j"><input name="bank" type="radio" value="中国光大银行" id="j" shorthand="CEB"/></label></li>--}}
												<li class="li_11"><label for="k"><input name="bank" type="radio" value="中国民生银行" id="k" shorthand="CMBC"/></label></li>
												<li class="li_12"><label for="l"><input name="bank" type="radio" value="中国农业银行" id="l" shorthand="ABC"/></label></li>
												<li class="li_13"><label for="m"><input name="bank" type="radio" value="广发银行" id="m" shorthand="CGB"/></label></li>
												<li class="li_14"><label for="n"><input name="bank" type="radio" value="南京银行" id="n" shorthand="NJCB"/></label></li>
												<li class="li_15"><label for="o"><input name="bank" type="radio" value="宁波银行" id="o" shorthand="NBCB"/></label></li>
												<li class="li_16"><label for="p"><input name="bank" type="radio" value="平安银行" id="p" shorthand="PAB"/></label></li>
											</ul>
											<input type="hidden"  id="bank_code">
										</div>
										<div class="banks-foot">
											<button class="btn btn-enter">确定</button>
											<button class="btn btn-cancel">取消</button>
										</div>
									</div>


								</div>
								<!--快捷卡结束-->
								<?php }else{?>
								<div class="pass-cont mon-charge">
									<div style="margin-left:100px;color:#333;">请先完成<a href="/username_auth_one" style="color:#f60;">实名认证</a>！</div>
								</div>
								<?php }?>

								<div class="pass-cont mon-bank">
									<form name=formbill action="sends" method=post onsubmit="return vamountwgsa()" target="_blank">
										<label for="">请选择银行</label>
										<br/>
										<div class="banks">
											<ul>
												<li class="li_1"><label for="aa"><input name="bank" type="radio" value="1025" id="aa" checked="" shorthand="ICBC"/></label></li>
												<li class="li_2"><label for="bb"><input name="bank" type="radio" value="1051" id="bb" shorthand="CCB"/></label></li>
												<li class="li_3"><label for="cc"><input name="bank" type="radio" value="3080" id="cc" shorthand="CMB"/></label></li>
												<li class="li_4"><label for="dd"><input name="bank" type="radio" value="3230" id="dd" shorthand="PSBC"/></label></li>
												<li class="li_5"><label for="ee"><input name="bank" type="radio" value="3407" id="ee" shorthand="BCM"/></label></li>
												<li class="li_6"><label for="ff"><input name="bank" type="radio" value="104" id="ff" shorthand="BOC"/></label></li>
												<li class="li_7"><label for="gg"><input name="bank" type="radio" value="310" id="gg" shorthand="BOB"/></label></li>
												<li class="li_8"><label for="hh"><input name="bank" type="radio" value="313" id="hh" shorthand="CITIC"/></label></li>
												<li class="li_9"><label for="ii"><input name="bank" type="radio" value="311" id="ii" shorthand="HXB"/></label></li>
												{{--<li class="li_10"><label for="jj"><input name="bank" type="radio" value="312" id="jj" shorthand="CEB"/></label></li>--}}
												<li class="li_11"><label for="kk"><input name="bank" type="radio" value="305" id="kk" shorthand="CMBC"/></label></li>
												<li class="li_12"><label for="ll"><input name="bank" type="radio" value="103" id="ll" shorthand="ABC"/></label></li>
												<li class="li_13"><label for="mm"><input name="bank" type="radio" value="3061" id="mm" shorthand="CGB"/></label></li>
												<li class="li_14"><label for="nn"><input name="bank" type="radio" value="316" id="nn" shorthand="NJCB"/></label></li>
												<li class="li_15"><label for="oo"><input name="bank" type="radio" value="302" id="oo" shorthand="NBCB"/></label></li>
												<li class="li_16"><label for="pp"><input name="bank" type="radio" value="307" id="pp" shorthand="PAB"/></label></li>
											</ul>
										</div>
										<div class="bank_collections">
											<div class="coll-box">
												<table>
													<tr>
														<td>卡种</td>
														<td>所需条件</td>
														<td>单笔限额（元）</td>
														<td>每日限额（元）</td>
													</tr>
													<tr>
														<td rowspan="4">借记卡</td>
														<td>通过柜面注册，静态支付密码</td>
														<td>300</td>
														<td>300</td>
													</tr>
													<tr>
														<td>办理电子银行口令卡，开通短信认证</td>
														<td>2000</td>
														<td>5000</td>
													</tr>
													<tr>
														<td>办理电子银行口令卡(无需开通短信)</td>
														<td>500</td>
														<td>1000</td>
													</tr>
													<tr>
														<td>办理U盾</td>
														<td>100万</td>
														<td>100万</td>
													</tr>
												</table>
												<p>*中国工商银行服务热线 95588</p>
											</div>
											<div class="coll-box">
												<table>
													<tr>
														<td>卡种</td>
														<td>所需条件</td>
														<td>单笔限额（元）</td>
														<td>每日限额（元）</td>
													</tr>
													<tr>
														<td rowspan="3">借记卡</td>
														<td>动态口令卡（刮刮卡）客户或短信动</td>
														<td>5000</td>
														<td>5000</td>
													</tr>
													<tr>
														<td>一代网银盾</td>
														<td>5万</td>
														<td>10万</td>
													</tr>
													<tr>
														<td>一代网银盾+动态口令卡或一代网银</td>
														<td>50万</td>
														<td>50万</td>
													</tr>
												</table>
												<p>*中国建设银行服务热线 95533</p>
											</div>
											<div class="coll-box">
												<table>
													<tr>
														<td>卡种</td>
														<td>所需条件</td>
														<td>单笔限额（元）</td>
														<td>每日限额（元）</td>
													</tr>
													<tr>
														<td rowspan="2">借记卡</td>
														<td>开通大众版网上支付功能</td>
														<td>500</td>
														<td>500</td>
													</tr>
													<tr>
														<td>开通专业版网上支付功能</td>
														<td>无限额</td>
														<td>无限额</td>
													</tr>
												</table>
												<p>*招商银行服务热线 95555</p>
											</div>
											<div class="coll-box">
												<table>
													<tr>
														<td>卡种</td>
														<td>所需条件</td>
														<td>单笔限额（元）</td>
														<td>每日限额（元）</td>
													</tr>
													<tr>
														<td rowspan="3">借记卡</td>
														<td>手机动码</td>
														<td>1万</td>
														<td>1万</td>
													</tr>
													<tr>
														<td>动态口令卡</td>
														<td>20万</td>
														<td>20万</td>
													</tr>
													<tr>
														<td>UKEY+手机动码</td>
														<td>200万</td>
														<td>200万</td>
													</tr>
												</table>
												<p>*邮政储蓄银行服务热线 95580</p>
											</div>
											<div class="coll-box">
												<table>
													<tr>
														<td>卡种</td>
														<td>所需条件</td>
														<td>单笔限额（元）</td>
														<td>每日限额（元）</td>
													</tr>
													<tr>
														<td rowspan="2">借记卡</td>
														<td>短信密码用户</td>
														<td>默认5000-可调高至20万</td>
														<td>默认5000-可调高至20万</td>
													</tr>
													<tr>
														<td>证书用户</td>
														<td>100万</td>
														<td>100万</td>
													</tr>
												</table>
												<p>*交通银行服务热线 95559</p>
											</div>
											<div class="coll-box">
												<table>
													<tr>
														<td>卡种</td>
														<td>所需条件</td>
														<td>单笔限额（元）</td>
														<td>每日限额（元）</td>
													</tr>
													<tr>
														<td>借记卡</td>
														<td>开通中银e令或中银e盾</td>
														<td>5万</td>
														<td>5万</td>
													</tr>
												</table>
												<p>*中国银行服务热线 95566</p>
											</div>
											<div class="coll-box">
												<table>
													<tr>
														<td>卡种</td>
														<td>所需条件</td>
														<td>单笔限额（元）</td>
														<td>每日限额（元）</td>
													</tr>
													<tr>
														<td rowspan="3">借记卡</td>
														<td>普通</td>
														<td>300</td>
														<td>300</td>
													</tr>
													<tr>
														<td>动态密码</td>
														<td>1000</td>
														<td>5000</td>
													</tr>
													<tr>
														<td>证书</td>
														<td>100万</td>
														<td>100万</td>
													</tr>
												</table>
												<p>*北京银行服务热线 95526</p>
											</div>
											<div class="coll-box">
												<table>
													<tr>
														<td>卡种</td>
														<td>所需条件</td>
														<td>单笔限额（元）</td>
														<td>每日限额（元）</td>
													</tr>
													<tr>
														<td rowspan="2">借记卡</td>
														<td>文件证书</td>
														<td>1000</td>
														<td>5000</td>
													</tr>
													<tr>
														<td>数字证书(USBKEY)</td>
														<td>自行设定</td>
														<td>自行设定</td>
													</tr>
												</table>
												<p>*中信银行服务热线 95558</p>
											</div>
											<div class="coll-box">
												<table>
													<tr>
														<td>卡种</td>
														<td>所需条件</td>
														<td>单笔限额（元）</td>
														<td>每日限额（元）</td>
													</tr>
													<tr>
														<td rowspan="3">借记卡</td>
														<td>非签约客户</td>
														<td>300</td>
														<td>1000</td>
													</tr>
													<tr>
														<td>证书/U-key</td>
														<td>5000</td>
														<td>5000</td>
													</tr>
													<tr>
														<td>电子钱包用户</td>
														<td>无限额</td>
														<td>无限额</td>
													</tr>
												</table>
												<p>*华夏银行服务热线 95577</p>
											</div>
											<div class="coll-box">
												<table>
													<tr>
														<td>卡种</td>
														<td>所需条件</td>
														<td>单笔限额（元）</td>
														<td>每日限额（元）</td>
													</tr>
													<tr>
														<td rowspan="5">借记卡</td>
														<td>银行卡直接支付（手机）</td>
														<td>5000</td>
														<td>1万</td>
													</tr>
													<tr>
														<td>银行卡直接支付（令牌）</td>
														<td>50万</td>
														<td>50万</td>
													</tr>
													<tr>
														<td>网银专业版支付（手机）</td>
														<td>5000</td>
														<td>1万</td>
													</tr>
													<tr>
														<td>网银专业版支付（令牌）</td>
														<td>50万</td>
														<td>50万</td>
													</tr>
													<tr>
														<td>网银专业版支付（阳光）</td>
														<td>50万</td>
														<td>50万</td>
													</tr>
												</table>
												<p>*光大银行服务热线 95595</p>
											</div>
											<div class="coll-box">
												<table>
													<tr>
														<td>卡种</td>
														<td>所需条件</td>
														<td>单笔限额（元）</td>
														<td>每日限额（元）</td>
													</tr>
													<tr>
														<td rowspan="3">借记卡</td>
														<td>无证书客（个人网上银）</td>
														<td>300</td>
														<td>300</td>
													</tr>
													<tr>
														<td>贵宾版（浏览器证书）</td>
														<td>5000</td>
														<td>5000</td>
													</tr>
													<tr>
														<td>贵宾版（U宝）</td>
														<td>50万</td>
														<td>50万</td>
													</tr>
												</table>
												<p>*民生银行服务热线 95568</p>
											</div>
											<div class="coll-box">
												<table>
													<tr>
														<td>卡种</td>
														<td>所需条件</td>
														<td>单笔限额（元）</td>
														<td>每日限额（元）</td>
													</tr>
													<tr>
														<td rowspan="3">借记卡</td>
														<td>一代K宝</td>
														<td>50万</td>
														<td>100万</td>
													</tr>
													<tr>
														<td>二代K宝</td>
														<td>100万</td>
														<td>500万</td>
													</tr>
													<tr>
														<td>动态口令卡</td>
														<td>1000</td>
														<td>3000</td>
													</tr>
												</table>
												<p>*中国农业银行服务热线 95599</p>
											</div>
											<div class="coll-box">
												<table>
													<tr>
														<td>卡种</td>
														<td>所需条件</td>
														<td>单笔限额（元）</td>
														<td>每日限额（元）</td>
													</tr>
													<tr>
														<td rowspan="5">借记卡</td>
														<td>卡密</td>
														<td>不限</td>
														<td>1000</td>
													</tr>
													<tr>
														<td>短信动态验证码（通过）</td>
														<td>不限</td>
														<td>5000</td>
													</tr>
													<tr>
														<td>短信动态验证码（通过）</td>
														<td>不限</td>
														<td>2万</td>
													</tr>
													<tr>
														<td>Key盾</td>
														<td>不限</td>
														<td>100万</td>
													</tr>
													<tr>
														<td>Key令</td>
														<td>不限</td>
														<td>5万</td>
													</tr>
												</table>
												<p>*广发银行服务热线 95508</p>
											</div>
											<div class="coll-box">
												<table>
													<tr>
														<td>卡种</td>
														<td>所需条件</td>
														<td>单笔限额（元）</td>
														<td>每日限额（元）</td>
													</tr>
													<tr>
														<td rowspan="3">借记卡</td>
														<td>手机动态密码用户</td>
														<td>5000</td>
														<td>2万</td>
													</tr>
													<tr>
														<td>数字证书+手机动态密</td>
														<td>5万</td>
														<td>20万</td>
													</tr>
													<tr>
														<td>Ukey+手机动态密码用</td>
														<td>100万</td>
														<td>100万</td>
													</tr>
												</table>
												<p>*东亚银行服务热线 800-830-3811</p>
											</div>
											<div class="coll-box">
												<table>
													<tr>
														<td>卡种</td>
														<td>所需条件</td>
														<td>单笔限额（元）</td>
														<td>每日限额（元）</td>
													</tr>
													<tr>
														<td rowspan="2">借记卡</td>
														<td>数字证书版</td>
														<td>自行设定</td>
														<td>自行设定</td>
													</tr>
													<tr>
														<td>动态密码版</td>
														<td>5万</td>
														<td>5万</td>
													</tr>
												</table>
												<p>*浦发银行服务热线 95528</p>
											</div>
											<div class="coll-box">
												<table>
													<tr>
														<td>单笔最多充值</td>
														<td>单日最多充值</td>
														<td>单月最多充值</td>
													</tr>
													<tr>
														<td>500000元</td>
														<td>40320000元</td>
														<td>110050000元</td>
													</tr>
												</table>
											</div>
										</div>
										<div class="form-group form-rem">
											<label for="" class="left control-label"><span>*</span>充值金额：</label>
											<input name="v_amount" type="text" value=""  id="v_amount" class="left form-control" placeholder="请填写金额">
											<div class="left remainder">
												可用余额：<span>￥<?php  if(!empty($UserExtendone->user_balance)){ echo $UserExtendone->user_balance;}else{ echo "0.00";}?></span>
											</div>
											<input type="hidden" name="v_oid">
										</div>
										<div class="form-group form-rem rem-last">
											<input type="submit" name="Submit" value=" 确认充值 " class="btn left btn-default">
										</div>
									</form>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>


<!-- footer   yinhang-->
@include('common.index_foot')

<script src="./resource/js/jquery-1.11.3.min.js"></script>
<script src="./resource/js/index.js"></script>
<script src="./resource/js/user.js"></script>

<script type="text/javascript">
	function tradeAmount(){
		var tradeAmount=$("#tradeAmount").val();//充值金额
		if(tradeAmount==''||tradeAmount==null){
			Showbo.Msg.nameauth("请输入金额！！！",function(btn){
			})
			return false;
		}
		if(isNaN(tradeAmount)){
			Showbo.Msg.nameauth("金额必须是数字！！！",function(btn){
			})
			return false;
		}
		if(tradeAmount>=5000){
			Showbo.Msg.nameauth("对不起,每笔限额50000元",function(btn){
			})
			return false;
		}
	}
	//网关充值判断
	function vamountwg(){
		var v_amount=$("#v_amount").val();//充值金额
		if(v_amount==''||v_amount==null){
			Showbo.Msg.nameauth("请输入金额！！！",function(btn){
			})
			return false;
		}
		if(isNaN(v_amount)){
			Showbo.Msg.nameauth("金额必须是数字！！！",function(btn){
			})
			return false;
		}

	}
	//检测金额是否为空
	function check_all(){
		return (tradeAmount())
	}
	//检测金额是否为空
	function vamountwgsa(){
		return (vamountwg())
	}
	// })
	//验证手机号
	function validatemobile(mobile){
		if(mobile.length != 11){
			return false;
		}
		var myreg = /^((((13|15|18|14)[0-9]{1}))+\d{8})$/;
		if(!myreg.test(mobile)){
			return false;
		}
		return true;
	}

	function news(){
		var news_captcha = $('#news_captcha').val();
		var ajax = new XMLHttpRequest();
		var status = false;
		ajax.onreadystatechange = function () {
			if (ajax.readyState == 4) {
				if (ajax.responseText == 1) {
					document.getElementById("t_news").innerHTML = "<span style='color:green'>√</span>";
					status = true
				}else{
					document.getElementById("t_news").innerHTML = "<span style='color:red'>短信验证码错误</span>";
				}
			}
		}
		//与服务器建立连接
		ajax.open('post', '/js_up_pay_pwd', false);
		ajax.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
		//处理请求
		ajax.send('news_captcha=' + news_captcha);
		return status;
	}
	function getSltValue() {
		var  myselect		= $("#bank_name").html()
		var  yinhang		=$("#yinhang").val();
		var  phone			=$("#phone").val();
		var  realname		=$("#real_name").val();
		var  id_card		=$("#id_card").val();
		var  bank_code     	=$("#bank_code").val();
		//var news_captcha = $('#news_captcha').val();短信验证

//		alert(bank_code);
//		//alert(news_captcha);
		var reg = /^(\d{16}|\d{19})$/;
		if(myselect==''){
			Showbo.Msg.nameauth("选择银行不能为空",function(btn){
			})
			return true;
		}
		if(!reg.test(yinhang)){
			Showbo.Msg.nameauth("银行卡号不对",function(btn){
			})
			return false;
		}
		if(!validatemobile(phone)){
			Showbo.Msg.nameauth("请填写正确的手机号",function(btn){
			})
			return false;
		}
//		if(news_captcha==''){
//			 Showbo.Msg.nameauth("验证码不能为空",function(btn){
//			})
//			 return false;
//		}
//		if(news()){
		$.ajax({
			url : '/ajax_user_money',
			type : "POST",
			data : {myselect:myselect,yinhang:yinhang,phone:phone,bank_code:bank_code,realname:realname,id_card:id_card},
			dataType : "json",
			cache:"false",
			timeout:30000,
			success : function(json){
				if (json.code == 1) {//ok
					alert(json.mess);
					window.location.href = json.url;
					return false;
				} if (json.code == 2) {//ok
					alert(json.mess);
				}
			},

		});
		//}
	}

	//获取短信验证码
	$('#f_captcha').bind('click',function foo() {
		var mobile = document.getElementById('phone').value;
		var wait = 60;
		var int = function fetch_captcha() {
			if (wait == 0) {
				$("#f_captcha").bind("click", foo);
				$('#f_captcha').html('获取验证码');
				clearInterval(a)
				wait = 60;
			}
			else {
				$('#f_captcha').unbind("click", foo);
				$('#f_captcha').html("重新发送(" + wait + ")");
				wait--;
			}
		}
		var a = setInterval(int, 1000);
		$.ajax({
			url: "/verify_news",
			type: "POST",
			data: "mobile=" + mobile,
			success: function (msg) {
				if (msg == 10000) {
					$("#t_news").html("<span style='color:green'>验证码发送成功,10分钟内输入有效</span>");
				}else if(msg == 160040){
					$("#t_news").html("<span style='color:red'>您当日验证码发送次数过多</span>");
					window.clearInterval(a);//停止计时器
					$(".form-code span.code").removeAttr("disabled").css('cursor','pointer');//启用按钮
					$(".form-code span.code").html("获取短信验证码");
					return false;
				}else{
					$("#t_news").html("<span style='color:red'>验证码发送错误</span>");
					window.clearInterval(a);//停止计时器
					$(".form-code span.code").removeAttr("disabled").css('cursor','pointer');//启用按钮
					$(".form-code span.code").html("获取短信验证码");
					return false;
				}
			}
		});
	})
</script>


</body>
</html>